package com.IntelligentCommunity.deploy.domain;

import com.IntelligentCommunity.common.core.annotation.Excel;
import com.IntelligentCommunity.common.core.web.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 抓拍记录对象 deploy_alarm
 *
 * @author kwzjx
 * @date 2024-07-23
 */
@TableName("deploy_alarm")
@Data
public class DeployAlarm {

    @TableId(type = IdType.AUTO)
    /** id */
    private Long id;

    /** 抓拍时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "抓拍时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date captureTime;

    /** 告警类型0人脸 1车辆 */
    @Excel(name = "告警类型0人脸 1车辆")
    private Long type;

    /** 抓拍照片 */
    @Excel(name = "抓拍照片")
    private String image;

    /** 设备id */
    @Excel(name = "设备id")
    private Long securityFacilitesId;

    /** 相似度 */
    @Excel(name = "相似度")
    private Double similarity;

    /** 任务subject */
    @Excel(name = "任务subject")
    private String subject;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    /** 任务id */
    @Excel(name = "任务id")
    private Long taskId;

    @Excel(name = "旧图片")
    @TableField(exist = false)
    private String oldImg;

    @TableField(exist = false)
    @Excel(name = "姓名")
    private String name;

    @Excel(name = "年龄")
    @TableField(exist = false)
    private Integer age;

    @Excel(name = "性别")
    @TableField(exist = false)
    private Integer gender;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("captureTime", getCaptureTime())
            .append("type", getType())
            .append("image", getImage())
            .append("securityFacilitesId", getSecurityFacilitesId())
            .append("similarity", getSimilarity())
            .append("subject", getSubject())
            .append("status", getStatus())
            .toString();
    }
}
